/* BPMN设计器直接汉化CSS - 强制覆盖所有英文文本 */

/* 调色板元素汉化 - 使用更简单的方法 */
.djs-palette .entry[title="Start Event"] {
  position: relative !important;
}

.djs-palette .entry[title="Start Event"]:hover::after {
  content: "开始事件" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="End Event"]:hover::after,
.djs-palette .entry[title="End Event"]:hover::before {
  content: "结束事件" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Task"]:hover::after,
.djs-palette .entry[title="Task"]:hover::before {
  content: "任务" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="User Task"]:hover::after,
.djs-palette .entry[title="User Task"]:hover::before {
  content: "用户任务" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Service Task"]:hover::after,
.djs-palette .entry[title="Service Task"]:hover::before {
  content: "服务任务" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Script Task"]:hover::after,
.djs-palette .entry[title="Script Task"]:hover::before {
  content: "脚本任务" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Manual Task"]:hover::after,
.djs-palette .entry[title="Manual Task"]:hover::before {
  content: "手工任务" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Business Rule Task"]:hover::after,
.djs-palette .entry[title="Business Rule Task"]:hover::before {
  content: "业务规则任务" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Exclusive Gateway"]:hover::after,
.djs-palette .entry[title="Exclusive Gateway"]:hover::before {
  content: "排他网关" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Parallel Gateway"]:hover::after,
.djs-palette .entry[title="Parallel Gateway"]:hover::before {
  content: "并行网关" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Inclusive Gateway"]:hover::after,
.djs-palette .entry[title="Inclusive Gateway"]:hover::before {
  content: "包容网关" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Sub Process"]:hover::after,
.djs-palette .entry[title="Sub Process"]:hover::before {
  content: "子流程" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Data Object"]:hover::after,
.djs-palette .entry[title="Data Object"]:hover::before {
  content: "数据对象" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.djs-palette .entry[title="Text Annotation"]:hover::after,
.djs-palette .entry[title="Text Annotation"]:hover::before {
  content: "文本注释" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

/* 属性面板汉化 */
.bpp-properties-panel .bpp-group-header:contains("General")::after {
  content: "常规" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Details")::after {
  content: "详细信息" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Extension Properties")::after {
  content: "扩展属性" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Form Fields")::after {
  content: "表单字段" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Listeners")::after {
  content: "监听器" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Multi Instance")::after {
  content: "多实例" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Asynchronous Continuations")::after {
  content: "异步延续" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Job Configuration")::after {
  content: "作业配置" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Input/Output")::after {
  content: "输入/输出" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Execution")::after {
  content: "执行" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Task Listener")::after {
  content: "任务监听器" !important;
}

.bpp-properties-panel .bpp-group-header:contains("Execution Listener")::after {
  content: "执行监听器" !important;
}

/* 字段标签汉化 */
.bpp-properties-panel label:contains("ID")::after {
  content: "标识符" !important;
}

.bpp-properties-panel label:contains("Name")::after {
  content: "名称" !important;
}

.bpp-properties-panel label:contains("Documentation")::after {
  content: "文档" !important;
}

.bpp-properties-panel label:contains("Assignee")::after {
  content: "指派人" !important;
}

.bpp-properties-panel label:contains("Candidate Users")::after {
  content: "候选用户" !important;
}

.bpp-properties-panel label:contains("Candidate Groups")::after {
  content: "候选组" !important;
}

.bpp-properties-panel label:contains("Due Date")::after {
  content: "到期日期" !important;
}

.bpp-properties-panel label:contains("Priority")::after {
  content: "优先级" !important;
}

.bpp-properties-panel label:contains("Form Key")::after {
  content: "表单键" !important;
}

.bpp-properties-panel label:contains("Type")::after {
  content: "类型" !important;
}

.bpp-properties-panel label:contains("Value")::after {
  content: "值" !important;
}

.bpp-properties-panel label:contains("Required")::after {
  content: "必需" !important;
}

.bpp-properties-panel label:contains("Readable")::after {
  content: "可读" !important;
}

.bpp-properties-panel label:contains("Writable")::after {
  content: "可写" !important;
}

.bpp-properties-panel label:contains("Script")::after {
  content: "脚本" !important;
}

.bpp-properties-panel label:contains("Resource")::after {
  content: "资源" !important;
}

.bpp-properties-panel label:contains("Topic")::after {
  content: "主题" !important;
}

.bpp-properties-panel label:contains("Message Name")::after {
  content: "消息名称" !important;
}

.bpp-properties-panel label:contains("Error Code")::after {
  content: "错误代码" !important;
}

.bpp-properties-panel label:contains("Error Message")::after {
  content: "错误消息" !important;
}

.bpp-properties-panel label:contains("Condition")::after {
  content: "条件" !important;
}

.bpp-properties-panel label:contains("Expression")::after {
  content: "表达式" !important;
}

.bpp-properties-panel label:contains("Language")::after {
  content: "语言" !important;
}

.bpp-properties-panel label:contains("Class")::after {
  content: "类" !important;
}

.bpp-properties-panel label:contains("External")::after {
  content: "外部" !important;
}

.bpp-properties-panel label:contains("Business Key")::after {
  content: "业务键" !important;
}

.bpp-properties-panel label:contains("In")::after {
  content: "输入" !important;
}

.bpp-properties-panel label:contains("Out")::after {
  content: "输出" !important;
}

.bpp-properties-panel label:contains("Local")::after {
  content: "本地" !important;
}

/* 按钮汉化 */
.bpp-properties-panel button:contains("Add")::after {
  content: "添加" !important;
}

.bpp-properties-panel button:contains("Remove")::after {
  content: "移除" !important;
}

.bpp-properties-panel button:contains("Edit")::after {
  content: "编辑" !important;
}

.bpp-properties-panel button:contains("Delete")::after {
  content: "删除" !important;
}

.bpp-properties-panel button:contains("Save")::after {
  content: "保存" !important;
}

.bpp-properties-panel button:contains("Cancel")::after {
  content: "取消" !important;
}

.bpp-properties-panel button:contains("OK")::after {
  content: "确定" !important;
}

.bpp-properties-panel button:contains("Apply")::after {
  content: "应用" !important;
}

.bpp-properties-panel button:contains("Reset")::after {
  content: "重置" !important;
}

.bpp-properties-panel button:contains("Clear")::after {
  content: "清除" !important;
}

.bpp-properties-panel button:contains("Select")::after {
  content: "选择" !important;
}

.bpp-properties-panel button:contains("Browse")::after {
  content: "浏览" !important;
}

.bpp-properties-panel button:contains("Upload")::after {
  content: "上传" !important;
}

.bpp-properties-panel button:contains("Download")::after {
  content: "下载" !important;
}

.bpp-properties-panel button:contains("Export")::after {
  content: "导出" !important;
}

.bpp-properties-panel button:contains("Import")::after {
  content: "导入" !important;
}

.bpp-properties-panel button:contains("Refresh")::after {
  content: "刷新" !important;
}

.bpp-properties-panel button:contains("Search")::after {
  content: "搜索" !important;
}

.bpp-properties-panel button:contains("Filter")::after {
  content: "过滤" !important;
}

/* 工具栏汉化 */
.djs-palette-toggle[title="Toggle Palette"]:hover::after {
  content: "切换调色板" !important;
  position: absolute !important;
  bottom: -25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

/* 确保调色板元素可见 */
.djs-palette {
  overflow: visible !important;
}

.djs-palette .entry {
  overflow: visible !important;
  position: relative !important;
}

/* 确保属性面板元素可见 */
.bpp-properties-panel {
  overflow: visible !important;
}

.bpp-properties-panel * {
  overflow: visible !important;
}
